package com.aaa.javaweb.dao.impl;


import com.aaa.javaweb.dao.UserDao;
import com.aaa.javaweb.entity.User;
import com.aaa.javaweb.until.JDBCUntil;
import com.sun.xml.internal.ws.api.ha.StickyFeature;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
@Repository
public class UserDaoImpl implements UserDao {
    @Override
    public List<Map> selALL() {
        String sql ="select * from t_user";
        return JDBCUntil.selectMap(sql);
    }

    @Override
    public int updone(User user) {
        String sql ="update t_user set status=? where id=?";
        return JDBCUntil.Updateout(sql,user.getStatus(),user.getId());

    }
}
